
            <div data-role="header" data-theme="e" data-position="fixed">
                <?php echo'<a href="'.$_SERVER['HTTP_REFERER'].'" data-transition="slide" class="ui-btn ui-btn-left ui-btn-icon-left ui-corner-all ui-shadow ui-icon-arrow-l"> Previous</a>'; ?>
                <?php echo '<h1 id="'.$tache->getIdTache().'" name="'.$idProjet.'"  > Tâche</h1>'; ?>
                <a href="accueil.php" class="ui-btn ui-btn-right ui-btn-icon-right ui-corner-all ui-shadow ui-icon-home"> Home</a>
            </div>
            
            <div data-role="main" class="ui-content" >
                <label for="dateEcheance">Nom</label>
                <?php echo '<input type="text"  id="name" name="texte" data-clear-btn="true"  value="'.$tache->getLibelleTache().'" >';?>
                <label for="dateEcheance">Echeance</label>
                <?php echo  '<input name="texte" type="text" data-role="datebox" data-datebox-mode="datebox" id="dateEcheance" value="'.$tache->getDateEcheanceTache().'"/>' ;?>
                <label for="dateRappel">Rappel</label>
                <?php echo'<input name="texte" type="text" data-role="datebox" data-datebox-mode="datebox" id="dateRappel" value="'.$tache->getDateRappelTache().'"/>' ?>
                <label for="type">Type de tâche</label>
                <center> <a id="<?php echo $tache->getLibelleid(); ?>" href="#overlayPanel" class="ui-btn ui-btn-b ui-btn-inline ui-corner-all ui-shadow"><?php echo utf8_encode($tache->getLibelletype()); ?></a> </center>
                <div data-role="panel" id="overlayPanel" data-display="overlay"> 
                    <p>Close the panel by clicking outside the panel, by swiping</p>
                    <?php
                         foreach($listType as $type){
                             echo '<button  id='.$type->getIdTypeTache().' name="type" class="ui-btn ui-btn-b ui-btn-corner-all" >'.utf8_encode($type->getLibelleTypeTache()).'</button>';
                        }
                    ?>
                    <!-- <center> <a href="#pageone" data-rel="close" class="ui-btn ui-btn-inline ui-shadow ui-corner-all ui-btn-a ui-icon-delete ui-btn-icon-left">Close panel</a> </center> -->
                </div> 
                <label for="comment">Description:</label>
                <?php echo '<textarea name="addcomment" id="comment" >'.$tache->getCommentaireTache().'</textarea>' ?>
                <center> <button  id="valid" class="ui-btn ui-btn-b ui-btn-corner-all" name="<?php echo $prevpage; ?>" >Valider</button> </center>
                <?php if ( $tache->getIdTache() != 0 ) {
                            echo '<center> <button class="ui-btn ui-btn-c ui-btn-corner-all" onclick="delTache(0);" >Terminer</button> </center>';
                      }
                ?>
                <!-- Popup en cas d'erreur -->
                <div data-role="popup" id="popupBasic" data-position-to="window">
                    <p style="color:red">Des champs n'ont pas été remplis.<p>
                </div>
                <div data-role="popup" id="popupdel" data-position-to="window">
                    <a href="#" data-rel="back" class="ui-btn ui-corner-all ui-shadow ui-btn ui-icon-delete ui-btn-icon-notext ui-btn-right">Close</a>
                    <p> Voulez vous vraiment terminer la tâche ?<p>
                    <?php  echo '<button class="ui-btn ui-btn-b ui-btn-corner-all" onclick="delTache('.$tache->getIdTache().','.$idProjet.',\''.$prevpage.'\');" >Oui</button>'; ?>
                </div>
            </div>
